home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / WASTE 1.2a4 / WASTE Demo / WEDemoHeaders.pch < prev    next >
Encoding:
Text File  |  1995-11-10  |  5.4 KB  |  210 lines  |  [TEXT/CWIE]

  1. /*
  2.      WEDemoHeaders.pch
  3.  
  4.     A "script" to automatically generate the precompiled header files for the C port of
  5.     the WASTE Demo Application (based upon the MacHeaders.pch script included on the
  6.     CodeWarrior 6 Gold CD).
  7.     
  8.     Just add this file to your project and go!
  9.     
  10.     This file is NOT an original part of the WASTE Demo App (written by Marco Piovanelli),
  11.     but something I added for a little happy functionality.  Read on to see why.
  12.     
  13.                                             - John C. Daub
  14.  
  15.  */
  16.  
  17. #ifdef __MWERKS__
  18. #ifdef __cplusplus
  19.  #ifdef powerc
  20.   #pragma precompile_target "WEDemoHeadersPPC++"
  21.  #else
  22.   #pragma precompile_target "WEDemoHeaders68k++"
  23.  #endif
  24. #else
  25.  #ifdef powerc
  26.   #pragma precompile_target "WEDemoHeadersPPC"
  27.  #else
  28.   #pragma precompile_target "WEDemoHeaders68k"
  29.  #endif
  30. #endif
  31. #endif
  32.  
  33. /*
  34.     There are some things that are not originally part of the WASTE Demo App, but
  35.     when I was originally talking with Marco about porting the demo to C (from Pascal),
  36.     he urged me to add in as much Copland support as possible.  So, there's probably
  37.     not 100% Copland support, but this is a start
  38. */
  39.  
  40.  
  41. /*
  42.     Let's make sure we use new system calls to ensure (hopefully) better support and
  43.     ease of use for future versions of system software.  Besides, WASTE is System 7
  44.     (at least) dependant, so might as well...
  45. */
  46.  
  47. #define SystemSixOrLater            1
  48. #define SystemSevenOrLater            1
  49. #define SystemSevenFiveOrLater        0
  50.  
  51. /*
  52.     Due to the ever evolving nature of Macintosh, we're gonna make sure that old routine
  53.     names are not being used (they're obsolete now).  You should also be using new
  54.     routine names since the Code Fragment Manager binds system calls by name.  See
  55.     ConditionalMacros.h for more info...
  56. */
  57.  
  58. #define OLDROUTINENAMES                0
  59.  
  60. /*
  61.     again, same thing as above...system calls are being moved around, e.g. c2pstr was
  62.     in Strings and is now in TextUtils.  Right now, things are set to allow people to
  63.     deal with old stuff, but it's being phased out...so let's make sure we're using
  64.     new stuff (see ConditionalMacros.h for more details)
  65. */
  66.  
  67. #define OLDROUTINELOCATIONS            0
  68.  
  69. /*
  70.     #define STRICT_XXX stuff here, as a step towards Copland happiness
  71. */
  72.  
  73.  
  74. #define STRICT_WINDOWS                1
  75. #define STRICT_CONTROLS                1
  76. #define STRICT_MENUS                1
  77.  
  78. /*
  79.     From a suggestion by Dan Crevier, all WASTE preprocessor directives are taken
  80.     care of in here (the precompiled header file).  This makes life a little easier
  81.     to deal with.  For example, you're working on a bunch of projects that all use
  82.     WASTE, but each project configures WASTE differently (e.g. some support Internet
  83.     Config, some don't).
  84.     
  85.     If you kept changing the #define's in WASTEIntf.h each time you worked on a project,
  86.     it'd get to be tooo much of a pain in the butt.  So, in WASTEIntf.h, I've commented
  87.     out all of these #define directives and put them all in here....this way, every
  88.     project can use the same source code.  Then, for each customizaztion, you can
  89.     do it in files specific to each project.
  90. */
  91.  
  92. #define WASTE_DEBUG                            0
  93. #define    WASTE_OBJECTS                        1
  94. #define WASTE_USE_UPPS                        GENERATINGCFM
  95. #define WASTE_REDRAW_SPEED                    0
  96. #define WASTE_PIN_SCROLL                    0
  97. #define WASTE_NO_SYNCH                        0
  98. #define WASTE_NO_RO_CARET                    0
  99. #define WASTE_IC_SUPPORT                    1
  100. #define WASTE_OBJECTS_ARE_GLYPHS            0
  101. #define WASTE_RESOLVE_FONT_DESIGNATORS        1
  102. #define WASTE_WECALTEXT_DOES_REDRAW            1
  103.  
  104. /*
  105.  *    Required for c-style toolbox glue function: c2pstr and p2cstr
  106.  *    the inverse operation (pointers_in_A0) is performed at the end ...
  107.  */
  108.  
  109. #ifndef powerc
  110.  #pragma pointers_in_D0                            
  111. #endif
  112.  
  113. /*
  114.  *    Metrowerks-specific definitions
  115.  *
  116.  *    These definitions are commonly used but not in Apple's headers. We define
  117.  *    them in our precompiled header so we can use the Apple headers without modification.
  118.  */
  119.  
  120. #define PtoCstr        p2cstr
  121. #define CtoPstr        c2pstr
  122. #define PtoCString    p2cstr
  123. #define CtoPString    c2pstr
  124.  
  125. #define topLeft(r)    (((Point *) &(r))[0])
  126. #define botRight(r)    (((Point *) &(r))[1])
  127.  
  128. #define TRUE        true
  129. #define FALSE        false
  130.  
  131. /*
  132.  *    Basic Apple #includes
  133.  *
  134.  *    Any universal headers-based project will very likely want these ones.
  135.  *  The #includes are in the proper order, to keep disk scans to a minimum.
  136.  *
  137.  */
  138.  
  139. #include <ConditionalMacros.h>
  140. #include <Types.h>
  141. #include <MixedMode.h>
  142. #include <QuickdrawText.h>
  143. #include <Quickdraw.h>
  144. #include <Memory.h>
  145. #include <OSUtils.h>
  146. #include <Events.h>
  147.  
  148. /*
  149.  *    Define GetCurrentA5() if target is 68K mac
  150.  *
  151.  */
  152.  
  153. #ifndef powerc
  154. //#include <MixedMode.h>
  155.  long GetCurrentA5(void)
  156.   ONEWORDINLINE(0x200D);
  157. #endif
  158.  
  159. /*
  160.  *    Additional Apple #includes
  161.  *
  162.  *    I'll be sure to put anything WASTE needs here, in proper build order
  163.  *
  164.  */
  165.  
  166. #include <Errors.h>
  167. #include <Gestalt.h>
  168. #include <Fonts.h>
  169. #include <Finder.h>
  170. #include <Files.h>
  171. #include <Resources.h>
  172. #include <IntlResources.h>
  173. #include <Script.h>
  174. #include <TextUtils.h>
  175. #include <FixMath.h>
  176. #include <Icons.h>
  177. #include <ToolUtils.h>
  178. #include <Processes.h>
  179. #include <AppleTalk.h>
  180. #include <Aliases.h>
  181. #include <EPPC.h>
  182. #include <Notification.h>
  183. #include <AppleEvents.h>
  184. #include <AEObjects.h>
  185. #include <AERegistry.h>
  186. #include <TextEdit.h>
  187. #include <Drag.h>
  188. #include <Scrap.h>
  189. #include <Menus.h>
  190. #include <Controls.h>
  191. #include <Windows.h>
  192. #include <Dialogs.h>
  193. #include <Palettes.h>
  194. #include <QDOffscreen.h>
  195. #include <LowMem.h>
  196. #include <Components.h>
  197. #include <TextServices.h>
  198. #include <StandardFile.h>
  199. #include <DiskInit.h>
  200.  
  201.  
  202. /*
  203.  *    required for c-style toolbox glue function: c2pstr and p2cstr
  204.  *    (match the inverse operation at the start of the file ...
  205.  */
  206.  
  207. #ifndef powerc
  208.  #pragma pointers_in_A0
  209. #endif
  210.